<?php
/**
 * Pert PHP Library
 * SQLGenerator
 * ArrayInput Class
 *
 * @author	Emre Hasegeli <hasegeli@gmail.com>
 * @license	GNU General Public License v3
 */

namespace Pert\PostgreSQLGenerator;

class ArrayInput
{
	private $array;

	public function __Construct(Array $array)
	{
		$this->array = $array;
	}

	public function SQL()
	{
		$sQL = '(';

		$count = 0;

		foreach($this->array AS $input)
		{
			if($count++)
				$sQL .= ', ';

			require_once __DIR__ . '/Input.php';

			$input = new Input($input);

			$sQL .= $input->SQL();
		}

		return $sQL . ')';
	}
}
